@echo off
REM PPH Production: Start all services via ecosystem file (Windows cmd)

setlocal
set ROOT=%~dp0..
set ECOSYSTEM=%ROOT%\config\ecosystem.config.cjs

where pm2 >nul 2>nul
if errorlevel 1 (
  echo pm2 not found in PATH. Using npx pm2.
  set PM2=npx pm2
) else (
  set PM2=pm2
)

%PM2% start "%ECOSYSTEM%" --env production
%PM2% list

echo Done. Open http://localhost:3012
exit /b 0

